package com.woniuxy.springelasticsearch.util;

import org.apache.http.HttpHost;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestHighLevelClient;

/**
 * @Author: linKe
 * @Date: 2022/1/18 14:46
 * @FileName: RestHighLevelClientUtil
 * @version: 1.0
 * @Description:  RestHighLevelClient 工具类
 */
public class RestHighLevelClientUtil {

    private static final HttpHost HTTP_HOST = new HttpHost("127.0.0.1",9200,"http");

    public static  RestHighLevelClient getClient(){
        return new RestHighLevelClient(RestClient.builder(HTTP_HOST));
    }
}
